import request, { post } from '@/utils/request'

export function login({ username, password }) {
  return post('/zhmsbg/backstageUser/login', {
    username,
    password
  })
}
export function getInfo() {
  return request({
    url: '/v1/auth/user/info',
    method: 'get'
  })
}

export function getMenu() {
  return request({
    url: '/zhmsbg/backstageUser/getUserPermissionGroup',
    method: 'get'
  })
}

export function getMenuTree() {
  return request({
    url: '/zhmsbg/backstageUser/getBackstageMenu',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}
export function updateUserInfo(data) {
  return request({
    url: '/zhmsbg/backstageUser/updateLoginUserMsg',
    method: 'post',
    data
  })
}

